

(function rem() {
	var fz =document.documentElement.clientWidth / 7.5;
	document.documentElement.style.fontSize =
		fz <= 100 ? fz + 'px' : '100px';
	window.onresize = function() {
		rem();
	};
})();


if(window.template) {
	template.defaults.imports.toFixed = function(value){
		return parseInt(value).toFixed(2)
	};

	template.defaults.imports.formatTime = function(value){
		return dateTimeFormat("yyyy-MM-dd", new Date(value))
	};

	template.defaults.imports.inOut = function(value){
		var text = '';
		Utils.Const.inOutType.forEach(function(item){
			if(item.value == value){
				text = item.text
			}
		});
		return text? text: value
	};

	template.defaults.imports.resZY = function(value){
		var text = '';
		Utils.Const.resZY.forEach(function(item){
			if(item.value == value){
				text = item.text
			}
		});
		return text? text: value
	};
}

if(window.layui){
	layui.use('table', function() {
		var table = layui.table;
		table.set({
			even: true,
			size: 'sm',
			skin: 'line',
			// where: {
			// 	accountId: ''
			// }
		});
	});
}
